﻿using System;

namespace Caramel.Cqrs
{
	public abstract class CommandExecutor<TCommand> : ICommandExecutor<TCommand>
		where TCommand : class, ICommand
	{
		public abstract void Execute(TCommand command);

		void ICommandExecutor.Execute(ICommand command)
		{
			this.Execute(command as TCommand);
		}
	}
}
